<?
if($_POST)
{
	if($_FILES["photo"]["name"] != "")
	{
	$newname = explode(".",$_FILES['photo']['name']);
	$newname = "logo.".$newname[(sizeof($newname)-1)];
	@unlink("../imgs/".$_POST['oldpic']);
	@copy($_FILES["photo"]["tmp_name"],"../imgs/".strtolower($newname));
	sleep(3);
	exit("<script type=\"text/javascript\">window.location='home.php?body=logosetting';</script>");
	}
}
?>

<p>

<img src="<?=logosetting()?>"  >
</p>

<p>
<fieldset>
<legend>Edit my  logo</legend>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<label>Image file</label><input name="photo" type="file" />
<label>Image Color</label><input name="img_name1" type="text" /><br /><br />
<input name="" type="submit" value="<?=btsubmit()?>" />
<INPUT TYPE="hidden" name="oldpic" value="<?=logosetting()?>">
</form>
</fieldset>
</p>